<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>
        Vue Calendar
    </title>
    <meta charset="utf-8" />
    <link href="css/bootstrap.min.css" rel="stylesheet" />
    <link href="scripts/components/calendar.css" rel="stylesheet" />
 	
    <script src="scripts/vue.min.js"></script>
    <script src="scripts/components/calendar.js"></script>

</head>
<body>
    <div id="app" style="margin:20px;">

        <h1>Date</h1>
        <div class="row">
            <div class="col-sm-4">
                <calendar v-on:select="changeCalendar" v-bind:format="'yyyy-MM-dd hh'" v-bind:date="date" v-bind:column="'date'"></calendar>
            </div>
            <div class="col-sm-8">
                {{ date }}
            </div>

        </div>

        <h1>Start & End Time</h1>
        <div class="row">
            <div class="col-sm-4">
                <calendar2 v-on:select="changecalendarFromTo" v-bind:date1="date_from1" v-bind:date2="date_to1"></calendar2>
            </div>
            <div class="col-sm-8">
                {{ date_from1 }} To {{ date_to1 }}
            </div>

        </div>
    </div>

    <script>
	
        new Vue({
            el: '#app',
            data: {
                date: "2018-09-03 9",
                date_from: "2018-09-03 9",
                date_to: "2018-09-03 9",
                date_from1: "2018-09-01 21",
                date_to1: "2018-09-03 9",
            },
            methods: {
                changeCalendar (value, column) {
                    this[column] = value;
                },
                changecalendarFromTo (from, to) {
                    this.date_from1 = from;
                    this.date_to1 = to;
                }
            }
        });


    </script>

</body>
</html>
